<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.console.servlets.trading.jysc.Sfxs"%>
<%@page import="com.blockchain.console.servlets.trading.jjfq.SfkyJyfq"%>
<%@page import="com.blockchain.console.servlets.trading.jysc.DeleteJysc"%>
<%@page import="com.blockchain.console.servlets.trading.jjfq.DeleteJyfq"%>
<%@page import="com.blockchain.console.servlets.trading.jysc.UpdateJysc"%>
<%@page import="com.blockchain.console.servlets.trading.jysc.AddJysc"%>
<%@page import="com.blockchain.console.service.trading.entity.JyscEntity"%>
<%@page import="com.blockchain.console.servlets.trading.jysc.JyscList"%>
<%@page import="com.blockchain.console.servlets.trading.xlb.DeleteXlb"%>
<%@page import="com.blockchain.console.servlets.trading.xlb.updateXlb"%>
<%@page import="com.blockchain.console.service.trading.entity.XlbEntity"%>
<%@page import="com.sun.org.apache.bcel.internal.generic.ISUB"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<html>
<head>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%
CURRENT_CATEGORY="JYGL";
CURRENT_SUB_CATEGORY="SCGL";
PagingResult<JyscEntity>  jyscs= (PagingResult<JyscEntity>)request.getAttribute("jyscs");
JyscEntity[] jyscArray = jyscs.getItems();
%>
<body>
	<%@include file="/WEB-INF/include/header.jsp"%>
	<div class="w_main">
		<div class="main clearfix">
			<div class="wrap">
			<form action="<%=controller.getURI(request, JyscList.class) %>" method="post">
				<div class="r_main">
					<div class="home_main">
						<div class="box box1 mb15">
							<div class="atil">
                    		<h3>交易市场管理</h3>
                  			</div>
						</div>
						<div class="box box1 mb15">
							<div class="clear"></div>
							<div class="con">
							<div class="admin_input admin_pb">
                       	    	<p>时间：<input type="text" name="start" readonly="readonly" id="datepicker1" class="yhgl_input date" />
                                <span class="pr10">至</span><input readonly="readonly" type="text" name="end" id="datepicker2" class="yhgl_input date" /></p>
						 		<div class="mt10">
						 			<input name="" type="submit" class="btn2 mr10" value="搜索" />
						 			<%if (blockchainSession.isAccessableResource(AddJysc.class)) {%>
									<a href="<%=controller.getURI(request, AddJysc.class) %>" class="btn3 mr10"><span class="ico3"></span>添加</a>
									<%}%>
						 			<div class="clear"></div>
								</div>
						    </div>
						</div>
						</div>
						<div>
							<table width="100%" border="0" cellspacing="0" cellpadding="3" class="yhgl_table tc">
						<tr class="hsbg">
                          <td>ID</td>
                          <td>市场名称/简称</td>
                          <td>价格小数位数</td>
                          <td>数量小数位数</td>
                          <td>买入手续费率</td>
                          <td>卖出手续费率</td>
                          <td>买入最小交易价</td>
                          <td>买入最大交易价</td>
                          <td>卖出最小交易价</td>
                          <td>卖出最大交易价</td>
                          <td>是否开启交易</td>
                          <td>是否显示</td>
                          <td>时间</td>
                          <td>操作</td>
                        </tr>
						<%
                        if (jyscArray != null) {for (int i =0;i<jyscArray.length;i++){JyscEntity j=jyscArray[i];if (j == null) {continue;}
                        %>
                        <tr class="dhsbg">
                          <td><%=j.id%></td>
                          <td>
                          <%StringHelper.filterHTML(out, j.zwm_s);%>(<%StringHelper.filterHTML(out, j.ywm_s);%>)/
                          <%StringHelper.filterHTML(out, j.zwm_m);%>(<%StringHelper.filterHTML(out, j.ywm_m);%>)
                          </td>
                          <td><%=j.xsws%></td>
                          <td><%=j.slxsws%></td>
                          <td><%=Formater.formatAmount_6(j.mr_sxf)%></td>
                          <td><%=Formater.formatAmount_6(j.mc_sxf)%></td>
                          <td><%=Formater.formatAmount_6(j.mr_zxj)%></td>
                          <td><%=Formater.formatAmount_6(j.mr_zdj)%></td>
                          <td><%=Formater.formatAmount_6(j.mc_zxj)%></td>
                          <td><%=Formater.formatAmount_6(j.mc_zdj)%></td>
                          <td><%=j.sfkqjy.getName()%></td>
                          <td><%=j.sfxs.getName()%></td>
                          <td><%=TimestampParser.format(j.sj)%></td>
                         <td>
                          <%if (blockchainSession.isAccessableResource(UpdateJysc.class)) {%>
                          	<span class="blue"><a href="<%=controller.getURI(request,UpdateJysc.class)%>?id=<%=j.id%>" class="mr10">编辑</a></span>
                          <%}%>
                       	<%if (blockchainSession.isAccessableResource(DeleteJysc.class)){%>
		                     <span class="blue"><a href="javascript:void(0)" onclick="load('<%=controller.getURI(request, DeleteJysc.class)%>?id=<%=j.id%>')" class="mr10">删除</a></span>
                         <%}%>
                         <%if (blockchainSession.isAccessableResource(SfkyJyfq.class)&&IsPass.F.toString().equals(j.sfkqjy.name())){%>
		                     <span class="blue"><a href="javascript:void(0)" onclick="load('<%=controller.getURI(request, SfkyJyfq.class)%>?id=<%=j.id%>&sfkqjyfq=<%=IsPass.S%>')" class="mr10">开启</a></span>
                         <%}%>
                         <%if (blockchainSession.isAccessableResource(SfkyJyfq.class)&&IsPass.S.toString().equals(j.sfkqjy.name())){%>
		                     <span class="blue"><a href="javascript:void(0)" onclick="load('<%=controller.getURI(request, SfkyJyfq.class)%>?id=<%=j.id%>&sfkqjyfq=<%=IsPass.F%>')" class="mr10">关闭</a></span>
                         <%}%> 
                         
                         <%if (blockchainSession.isAccessableResource(Sfxs.class)&&IsPass.F.toString().equals(j.sfxs.name())){%>
		                     <span class="blue"><a href="javascript:void(0)" onclick="load('<%=controller.getURI(request, Sfxs.class)%>?id=<%=j.id%>&sfxs=<%=IsPass.S%>')" class="mr10">显示</a></span>
                         <%}%>
                         <%if (blockchainSession.isAccessableResource(Sfxs.class)&&IsPass.S.toString().equals(j.sfxs.name())){%>
		                     <span class="blue"><a href="javascript:void(0)" onclick="load('<%=controller.getURI(request, Sfxs.class)%>?id=<%=j.id%>&sfxs=<%=IsPass.F%>')" class="">隐藏</a></span>
                         <%}%> 
                          </td>
						</tr>
								<%}}%>
							</table>
						</div>
							<%AbstractConsoleServlet.rendPagingResult(out, jyscs); %>
						<div class="box2 clearfix"></div>
					</div>
				</div>
				</form>
			</div>
			<%@include file="/WEB-INF/include/left.jsp" %>
		</div>
	</div>
	<%@include file="/WEB-INF/include/footer.jsp"%>
	<%@include file="/WEB-INF/include/script.jsp"%>
	<%@include file="/WEB-INF/include/datepicker.jsp"%>
	<script type="text/javascript">
		$(function() {
			$("#datepicker1").datepicker({inline: true});
		    $('#datepicker1').datepicker('option', {dateFormat:'yy-mm-dd'});
		    $("#datepicker2").datepicker({inline: true});
		    $('#datepicker2').datepicker('option', {dateFormat:'yy-mm-dd'});
		    $("#datepicker1").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("start"));%>");
		    $("#datepicker2").datepicker("setDate", "<%StringHelper.filterHTML(out, request.getParameter("end"));%>");
		});
		
		function load(url)
		{
			if (!window.confirm("你确定吗？")) {
				return;
			}
			location.href=url;
		}	
		</script>
</body>
</html>